<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Document</title>
</head>
<body>
	<script>
		let str='<a href="www.baidu.com">你好</a>'
		let p=/<a href="(.*)">(.*)<\/a>/
		let a=p.exec(str)
		console.log(a);
		//分组
		let c = /<a href="(?<url>.*)">(?<name>.*)<\/a>/
		let s = c.exec(str)
		console.log(s);
		str.trimStart()
		let arr=['12']
		arr.flat()
		
	</script>
</body>
</html>